﻿<?xml version="1.0" encoding="utf-8" ?>
<DbDataRequest connection="$ForumDBConnection$" type="$ForumDBType$" defaultFormatter="bizobj ForumGroup(forums(forumThreads))">
  <SqlStatement hasResults="true">
    SELECT 
      fg.id, fg.name,
	  f.id AS forumsid, f.name AS forumsname, f.forumGroupId as forumsforumGroupId,
	  ft.id AS forumThreadsid, ft.title AS forumThreadstitle, ft.forumId AS forumThreadsforumId
   FROM ForumGroup fg
   INNER JOIN Forum f ON fg.id=f.forumGroupId
   INNER JOIN ForumThread ft ON f.id=ft.forumId
   WHERE ft.id=@id
  </SqlStatement>
  <Param name="id" type="UniqueIdentifier" />
</DbDataRequest>
